package com.erp.erp_servers.Dictionary;

import com.erp.erp_entitys.Dictionary.DictionaryEntity;
import com.erp.erp_entitys.Dictionary.DictionaryEntityExample;
import com.erp.erp_entitys.Dictionary.DictionaryVoEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName IDictionaryKeyService
 * @Description
 * @Author songjizhen
 * @Date 2020/6/17 14:02
 * @Version 1.0
 */
public interface IDictionary2Service {
    long countByExample(DictionaryEntityExample example);

    int deleteByExample(DictionaryEntityExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(DictionaryEntity record);

    int insertSelective(DictionaryEntity record);

    List<DictionaryEntity> selectByExample(DictionaryEntityExample example);

    /**
     * 根据字典分类项与分类小项查询出字典列表,此服务为字典获取通过服务，其他服务为字典维护服务
     * @param type
     * @param lx
     * @return
     */
    List<DictionaryEntity> getValue(Integer type,Integer lx );

    DictionaryEntity selectByPrimaryKey(Integer id);

    /**
     * 获取所有字典分类列表
     * @return
     */
    List<DictionaryVoEntity> queryAlllx();
    int updateByExampleSelective(@Param("record") DictionaryEntity record, @Param("example") DictionaryEntityExample example);

    int updateByExample(@Param("record") DictionaryEntity record, @Param("example") DictionaryEntityExample example);

    int updateByPrimaryKeySelective(DictionaryEntity record);

    int updateByPrimaryKey(DictionaryEntity record);

    /**
     * 根据 大类 小类 编码 获取字典实体
     * @param type
     * @param lx
     * @param code
     * @return
     */
    DictionaryEntity selectByParam(Integer type,Integer lx,String code);
}
